package dlally.controller;

import dlally.model.DecisionLinesEvent;
import dlally.view.GameFieldGUI;

public class ChoiceController {
	
	GameFieldGUI gui;
	DecisionLinesEvent model;
	int i;
	
	public ChoiceController(GameFieldGUI gui, DecisionLinesEvent model, int i){
		this.gui = gui;
		this.model = model;
		this.i = i;
	}
	
	public void process(){
		String text = gui.getChoice(i).getText();
		if(!model.setChoice(i, text))
			gui.getChoice(i).setText("");
	}

}
